<?php

class StringUtils
{
    public static function IsNullOrEmpty($value)
    {
        return !isset($value) || ($value === '');
    }

    /**
     * @static
     * @param string $string
     * @return string
     */
    public static function RemoveNewLines($string)
    {
        return str_replace("\n", '', $string);
    }

    public static function Format($format)
    {
        $arg_list = func_get_args();
        return call_user_func_array('sprintf', $arg_list);
    }

    /**
     * @static
     * @param string $result
     * @param string $string
     * @param string $delimiter
     * @return void
     */
    public static function AddStr(&$result, $string, $delimiter = '')
    {
        if (isset($string) && $string != '')
        {
            if(!($result == ''))
                $result = $result . $delimiter;
            $result = $result . $string;
        }
    }
}



?>